package adfc2.actions;

import adfc2.core.Creature;
import adfc2.entities.Workshop;

public class LeaveWorkshopAction extends InstantAction {

    public LeaveWorkshopAction(Creature actor) {
        super(actor);
    }

    @Override
    protected boolean perform() {
        assert (actor.container != null);
        assert (actor.container instanceof Workshop);
        ((Workshop) actor.container).workerLeft();
        return true;
    }

    @Override
    public String toString() {
        return "LeaveWorkshopAction";
    }
}
